package com.abc.cloud.service;

import com.abc.cloud.entity.FileEntity;
import com.abc.cloud.vo.file.FileShare;
import com.abc.cloud.vo.file.FileShareAdminUpdate;
import com.abc.cloud.vo.file.FileShareCheck;
import com.abc.cloud.vo.file.FileShareUpdate;
import com.baomidou.mybatisplus.extension.service.IService;
import com.abc.cloud.common.utils.PageUtil;
import com.abc.cloud.entity.FileShareEntity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 文件分享表
 *
 * @author LiJunXi
 * @email 2770063826@qq.com
 * @date 2023-10-27 13:09:54
 */
public interface FileShareService extends IService<FileShareEntity> {

    PageUtil queryPage(Map<String, Object> params);

    Map<String, String> shareFile(FileShare fileShare);

    PageUtil getFileShare(Map<String, Object> params, HttpServletRequest httpServletRequest);

    Map<String, Object> info(String uuid, HttpServletRequest httpServletRequest);

    Boolean check(FileShareCheck fileShareCheck, HttpServletRequest httpServletRequest);

    void updateShare(FileShareUpdate fileShareUpdate);

    void download(HttpServletResponse response, String uuid, Long id, HttpServletRequest request, Long userId);

    PageUtil adminQueryList(Map<String, Object> params);

    void adminDeleteFile(List<Long> fileIds, Integer status);

    void adminUpdateShareFile(FileShareAdminUpdate fileShareAdminUpdate);

    void saveDatabase(Integer timeRange, Long userId, String username, FileEntity fileEntity, String uuid, String resStr, String code);
}

